home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / veryla1a / frmtest.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-09-22  |  82.5 KB  |  2,033 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  4. Begin VB.Form frmTest 
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "TorchLight Info Class Test Program"
  7.    ClientHeight    =   6090
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   7320
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   6090
  14.    ScaleWidth      =   7320
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton cmdQuit 
  17.       Caption         =   "Quit"
  18.       Height          =   375
  19.       Left            =   5640
  20.       TabIndex        =   79
  21.       Top             =   5640
  22.       Width           =   1215
  23.    End
  24.    Begin VB.Timer timerKeyboard 
  25.       Interval        =   100
  26.       Left            =   1200
  27.       Top             =   5520
  28.    End
  29.    Begin MSComctlLib.ImageList MouseClickImages 
  30.       Left            =   3000
  31.       Top             =   5280
  32.       _ExtentX        =   1005
  33.       _ExtentY        =   1005
  34.       BackColor       =   -2147483643
  35.       ImageWidth      =   32
  36.       ImageHeight     =   32
  37.       MaskColor       =   12632256
  38.       _Version        =   393216
  39.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  40.          NumListImages   =   4
  41.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  42.             Picture         =   "frmTest.frx":0000
  43.             Key             =   ""
  44.          EndProperty
  45.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  46.             Picture         =   "frmTest.frx":0452
  47.             Key             =   ""
  48.          EndProperty
  49.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  50.             Picture         =   "frmTest.frx":08A4
  51.             Key             =   ""
  52.          EndProperty
  53.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  54.             Picture         =   "frmTest.frx":0CF6
  55.             Key             =   ""
  56.          EndProperty
  57.       EndProperty
  58.    End
  59.    Begin VB.Timer timerMouse 
  60.       Interval        =   100
  61.       Left            =   720
  62.       Top             =   5520
  63.    End
  64.    Begin VB.Timer timerMemory 
  65.       Interval        =   1000
  66.       Left            =   240
  67.       Top             =   5520
  68.    End
  69.    Begin TabDlg.SSTab SSTab1 
  70.       Height          =   5445
  71.       Left            =   120
  72.       TabIndex        =   0
  73.       Top             =   120
  74.       Width           =   7125
  75.       _ExtentX        =   12568
  76.       _ExtentY        =   9604
  77.       _Version        =   393216
  78.       Style           =   1
  79.       Tabs            =   9
  80.       TabsPerRow      =   5
  81.       TabHeight       =   520
  82.       TabCaption(0)   =   "About"
  83.       TabPicture(0)   =   "frmTest.frx":1148
  84.       Tab(0).ControlEnabled=   -1  'True
  85.       Tab(0).Control(0)=   "lblAbout"
  86.       Tab(0).Control(0).Enabled=   0   'False
  87.       Tab(0).Control(1)=   "Label1"
  88.       Tab(0).Control(1).Enabled=   0   'False
  89.       Tab(0).Control(2)=   "Label2"
  90.       Tab(0).Control(2).Enabled=   0   'False
  91.       Tab(0).Control(3)=   "Label3"
  92.       Tab(0).Control(3).Enabled=   0   'False
  93.       Tab(0).Control(4)=   "Label4"
  94.       Tab(0).Control(4).Enabled=   0   'False
  95.       Tab(0).ControlCount=   5
  96.       TabCaption(1)   =   "System Info"
  97.       TabPicture(1)   =   "frmTest.frx":1164
  98.       Tab(1).ControlEnabled=   0   'False
  99.       Tab(1).Control(0)=   "lblBootType"
  100.       Tab(1).Control(0).Enabled=   0   'False
  101.       Tab(1).Control(1)=   "lblScreenRes"
  102.       Tab(1).Control(1).Enabled=   0   'False
  103.       Tab(1).Control(2)=   "lblNumProcs"
  104.       Tab(1).Control(2).Enabled=   0   'False
  105.       Tab(1).Control(3)=   "lblProcType"
  106.       Tab(1).Control(3).Enabled=   0   'False
  107.       Tab(1).Control(4)=   "lblSysUserName"
  108.       Tab(1).Control(4).Enabled=   0   'False
  109.       Tab(1).Control(5)=   "lblSysComputerName"
  110.       Tab(1).Control(5).Enabled=   0   'False
  111.       Tab(1).Control(6)=   "lblNumMonitors"
  112.       Tab(1).Control(6).Enabled=   0   'False
  113.       Tab(1).Control(7)=   "lblScreenSaverTimeout"
  114.       Tab(1).Control(7).Enabled=   0   'False
  115.       Tab(1).Control(8)=   "chkSecurity"
  116.       Tab(1).Control(8).Enabled=   0   'False
  117.       Tab(1).Control(9)=   "chkSlowMachine"
  118.       Tab(1).Control(9).Enabled=   0   'False
  119.       Tab(1).Control(10)=   "chkShowSounds"
  120.       Tab(1).Control(10).Enabled=   0   'False
  121.       Tab(1).Control(11)=   "chkFontSmoothing"
  122.       Tab(1).Control(11).Enabled=   0   'False
  123.       Tab(1).Control(12)=   "chkScreenSaverActive"
  124.       Tab(1).Control(12).Enabled=   0   'False
  125.       Tab(1).Control(13)=   "chkFullWindowDrag"
  126.       Tab(1).Control(13).Enabled=   0   'False
  127.       Tab(1).Control(14)=   "chkSystemBeep"
  128.       Tab(1).Control(14).Enabled=   0   'False
  129.       Tab(1).ControlCount=   15
  130.       TabCaption(2)   =   "Memory Info"
  131.       TabPicture(2)   =   "frmTest.frx":1180
  132.       Tab(2).ControlEnabled=   0   'False
  133.       Tab(2).Control(0)=   "lblMemPhysicalUsed"
  134.       Tab(2).Control(0).Enabled=   0   'False
  135.       Tab(2).Control(1)=   "lblMemoryLoad"
  136.       Tab(2).Control(1).Enabled=   0   'False
  137.       Tab(2).Control(2)=   "lblMemPhysicalAvail"
  138.       Tab(2).Control(2).Enabled=   0   'False
  139.       Tab(2).Control(3)=   "lblMemPhysicalTotal"
  140.       Tab(2).Control(3).Enabled=   0   'False
  141.       Tab(2).Control(4)=   "lblMemVirtualUsed"
  142.       Tab(2).Control(4).Enabled=   0   'False
  143.       Tab(2).Control(5)=   "lblMemVirtualAvail"
  144.       Tab(2).Control(5).Enabled=   0   'False
  145.       Tab(2).Control(6)=   "lblMemVirtualTotal"
  146.       Tab(2).Control(6).Enabled=   0   'False
  147.       Tab(2).Control(7)=   "lblMemPageFileUsed"
  148.       Tab(2).Control(7).Enabled=   0   'False
  149.       Tab(2).Control(8)=   "lblMemPageFileAvail"
  150.       Tab(2).Control(8).Enabled=   0   'False
  151.       Tab(2).Control(9)=   "lblMemPageFileTotal"
  152.       Tab(2).Control(9).Enabled=   0   'False
  153.       Tab(2).ControlCount=   10
  154.       TabCaption(3)   =   "File Info"
  155.       TabPicture(3)   =   "frmTest.frx":119C
  156.       Tab(3).ControlEnabled=   0   'False
  157.       Tab(3).Control(0)=   "lblCurrentDir"
  158.       Tab(3).Control(0).Enabled=   0   'False
  159.       Tab(3).Control(1)=   "lblTempDir"
  160.       Tab(3).Control(1).Enabled=   0   'False
  161.       Tab(3).Control(2)=   "lblSystemDir"
  162.       Tab(3).Control(2).Enabled=   0   'False
  163.       Tab(3).Control(3)=   "lblWindowsDir"
  164.       Tab(3).Control(3).Enabled=   0   'False
  165.       Tab(3).Control(4)=   "lblTempFileName"
  166.       Tab(3).Control(4).Enabled=   0   'False
  167.       Tab(3).Control(5)=   "cmdNewTemp"
  168.       Tab(3).Control(5).Enabled=   0   'False
  169.       Tab(3).ControlCount=   6
  170.       TabCaption(4)   =   "Network Info"
  171.       TabPicture(4)   =   "frmTest.frx":11B8
  172.       Tab(4).ControlEnabled=   0   'False
  173.       Tab(4).Control(0)=   "lblNetUserName"
  174.       Tab(4).Control(0).Enabled=   0   'False
  175.       Tab(4).Control(1)=   "lblNetComputerName"
  176.       Tab(4).Control(1).Enabled=   0   'False
  177.       Tab(4).Control(2)=   "chkNetworkPresent"
  178.       Tab(4).Control(2).Enabled=   0   'False
  179.       Tab(4).ControlCount=   3
  180.       TabCaption(5)   =   "Mouse Info"
  181.       TabPicture(5)   =   "frmTest.frx":11D4
  182.       Tab(5).ControlEnabled=   0   'False
  183.       Tab(5).Control(0)=   "lblMousePos"
  184.       Tab(5).Control(0).Enabled=   0   'False
  185.       Tab(5).Control(1)=   "lblDoubleClickRec"
  186.       Tab(5).Control(1).Enabled=   0   'False
  187.       Tab(5).Control(2)=   "lblDragRec"
  188.       Tab(5).Control(2).Enabled=   0   'False
  189.       Tab(5).Control(3)=   "lblDoubleClickTime"
  190.       Tab(5).Control(3).Enabled=   0   'False
  191.       Tab(5).Control(4)=   "lblDoubleClickTest"
  192.       Tab(5).Control(4).Enabled=   0   'False
  193.       Tab(5).Control(5)=   "lblMouseButtons"
  194.       Tab(5).Control(5).Enabled=   0   'False
  195.       Tab(5).Control(6)=   "lblWheelScrollLines"
  196.       Tab(5).Control(6).Enabled=   0   'False
  197.       Tab(5).Control(7)=   "lblDoublClickTimeLabel"
  198.       Tab(5).Control(7).Enabled=   0   'False
  199.       Tab(5).Control(8)=   "lblDblClickRecSeparator"
  200.       Tab(5).Control(8).Enabled=   0   'False
  201.       Tab(5).Control(9)=   "chkSwapButton"
  202.       Tab(5).Control(9).Enabled=   0   'False
  203.       Tab(5).Control(10)=   "MouseClickPicture"
  204.       Tab(5).Control(10).Enabled=   0   'False
  205.       Tab(5).Control(11)=   "chkMousePresent"
  206.       Tab(5).Control(11).Enabled=   0   'False
  207.       Tab(5).Control(12)=   "chkWheelPresent"
  208.       Tab(5).Control(12).Enabled=   0   'False
  209.       Tab(5).Control(13)=   "txtDblClickTime"
  210.       Tab(5).Control(13).Enabled=   0   'False
  211.       Tab(5).Control(14)=   "txtDblClickRecX"
  212.       Tab(5).Control(14).Enabled=   0   'False
  213.       Tab(5).Control(15)=   "txtDblClickRecY"
  214.       Tab(5).Control(15).Enabled=   0   'False
  215.       Tab(5).ControlCount=   16
  216.       TabCaption(6)   =   "Keyboard Info"
  217.       TabPicture(6)   =   "frmTest.frx":11F0
  218.       Tab(6).ControlEnabled=   0   'False
  219.       Tab(6).Control(0)=   "lblKeyboard"
  220.       Tab(6).Control(0).Enabled=   0   'False
  221.       Tab(6).Control(1)=   "lblKeyboardAsString"
  222.       Tab(6).Control(1).Enabled=   0   'False
  223.       Tab(6).Control(2)=   "lblKeyboardSubType"
  224.       Tab(6).Control(2).Enabled=   0   'False
  225.       Tab(6).Control(3)=   "lblTestBox"
  226.       Tab(6).Control(3).Enabled=   0   'False
  227.       Tab(6).Control(4)=   "lblCaretBlinkTime"
  228.       Tab(6).Control(4).Enabled=   0   'False
  229.       Tab(6).Control(5)=   "lblCaretPos"
  230.       Tab(6).Control(5).Enabled=   0   'False
  231.       Tab(6).Control(6)=   "lblKeyboardDelay"
  232.       Tab(6).Control(6).Enabled=   0   'False
  233.       Tab(6).Control(7)=   "lblDelayMore"
  234.       Tab(6).Control(7).Enabled=   0   'False
  235.       Tab(6).Control(8)=   "lblDelayLess"
  236.       Tab(6).Control(8).Enabled=   0   'False
  237.       Tab(6).Control(9)=   "lblKeyboardSpeed"
  238.       Tab(6).Control(9).Enabled=   0   'False
  239.       Tab(6).Control(10)=   "lblRepeatMore"
  240.       Tab(6).Control(10).Enabled=   0   'False
  241.       Tab(6).Control(11)=   "lblRepeatLess"
  242.       Tab(6).Control(11).Enabled=   0   'False
  243.       Tab(6).Control(12)=   "lblBlinkLess"
  244.       Tab(6).Control(12).Enabled=   0   'False
  245.       Tab(6).Control(13)=   "lblBlinkMore"
  246.       Tab(6).Control(13).Enabled=   0   'False
  247.       Tab(6).Control(14)=   "txtCaretTestBox"
  248.       Tab(6).Control(14).Enabled=   0   'False
  249.       Tab(6).Control(15)=   "sldKeyboardDelay"
  250.       Tab(6).Control(15).Enabled=   0   'False
  251.       Tab(6).Control(16)=   "sldKeyboardSpeed"
  252.       Tab(6).Control(16).Enabled=   0   'False
  253.       Tab(6).Control(17)=   "sldCaretBlinkSpeed"
  254.       Tab(6).Control(17).Enabled=   0   'False
  255.       Tab(6).ControlCount=   18
  256.       TabCaption(7)   =   "Actions"
  257.       TabPicture(7)   =   "frmTest.frx":120C
  258.       Tab(7).ControlEnabled=   0   'False
  259.       Tab(7).Control(0)=   "lblNewGUID"
  260.       Tab(7).Control(0).Enabled=   0   'False
  261.       Tab(7).Control(1)=   "cmdPlayExclamation"
  262.       Tab(7).Control(1).Enabled=   0   'False
  263.       Tab(7).Control(2)=   "cmdPlayQuestion"
  264.       Tab(7).Control(2).Enabled=   0   'False
  265.       Tab(7).Control(3)=   "cmdPlayAsterisk"
  266.       Tab(7).Control(3).Enabled=   0   'False
  267.       Tab(7).Control(4)=   "cmdPlaySystem"
  268.       Tab(7).Control(4).Enabled=   0   'False
  269.       Tab(7).Control(5)=   "cmdPlayOK"
  270.       Tab(7).Control(5).Enabled=   0   'False
  271.       Tab(7).Control(6)=   "cmdPlayStop"
  272.       Tab(7).Control(6).Enabled=   0   'False
  273.       Tab(7).Control(7)=   "cmdEnableStart"
  274.       Tab(7).Control(7).Enabled=   0   'False
  275.       Tab(7).Control(8)=   "cmdDisableStart"
  276.       Tab(7).Control(8).Enabled=   0   'False
  277.       Tab(7).Control(9)=   "cmdShowStart"
  278.       Tab(7).Control(9).Enabled=   0   'False
  279.       Tab(7).Control(10)=   "cmdHideStart"
  280.       Tab(7).Control(10).Enabled=   0   'False
  281.       Tab(7).Control(11)=   "cmdFormat"
  282.       Tab(7).Control(11).Enabled=   0   'False
  283.       Tab(7).Control(12)=   "cmdDisableDesktop"
  284.       Tab(7).Control(12).Enabled=   0   'False
  285.       Tab(7).Control(13)=   "cmdEnableDesktop"
  286.       Tab(7).Control(13).Enabled=   0   'False
  287.       Tab(7).Control(14)=   "cmdMakeGUID"
  288.       Tab(7).Control(14).Enabled=   0   'False
  289.       Tab(7).ControlCount=   15
  290.       TabCaption(8)   =   "Forms"
  291.       TabPicture(8)   =   "frmTest.frx":1228
  292.       Tab(8).ControlEnabled=   0   'False
  293.       Tab(8).Control(0)=   "cmdFlash"
  294.       Tab(8).Control(0).Enabled=   0   'False
  295.       Tab(8).Control(1)=   "cmdMinimizedFlash"
  296.       Tab(8).Control(1).Enabled=   0   'False
  297.       Tab(8).Control(2)=   "cmdDisableX"
  298.       Tab(8).Control(2).Enabled=   0   'False
  299.       Tab(8).ControlCount=   3
  300.       Begin VB.CommandButton cmdDisableX 
  301.          Caption         =   "Disable X"
  302.          Height          =   255
  303.          Left            =   -74520
  304.          TabIndex        =   87
  305.          Top             =   1320
  306.          Width           =   1095
  307.       End
  308.       Begin VB.CommandButton cmdMinimizedFlash 
  309.          Caption         =   "Minimize, then Flash"
  310.          Height          =   255
  311.          Left            =   -72720
  312.          TabIndex        =   86
  313.          Top             =   1680
  314.          Width           =   1695
  315.       End
  316.       Begin VB.CommandButton cmdFlash 
  317.          Caption         =   "Flash Window"
  318.          Height          =   255
  319.          Left            =   -72720
  320.          TabIndex        =   85
  321.          Top             =   1320
  322.          Width           =   1695
  323.       End
  324.       Begin VB.TextBox txtDblClickRecY 
  325.          Height          =   285
  326.          Left            =   -71880
  327.          TabIndex        =   83
  328.          Top             =   2040
  329.          Width           =   375
  330.       End
  331.       Begin VB.TextBox txtDblClickRecX 
  332.          Height          =   285
  333.          Left            =   -72600
  334.          TabIndex        =   82
  335.          Top             =   2040
  336.          Width           =   375
  337.       End
  338.       Begin VB.TextBox txtDblClickTime 
  339.          Height          =   285
  340.          Left            =   -72960
  341.          TabIndex        =   80
  342.          Top             =   1560
  343.          Width           =   855
  344.       End
  345.       Begin VB.CommandButton cmdMakeGUID 
  346.          Caption         =   "Generate GUID"
  347.          Height          =   255
  348.          Left            =   -74640
  349.          TabIndex        =   78
  350.          Top             =   4860
  351.          Width           =   1335
  352.       End
  353.       Begin VB.CommandButton cmdEnableDesktop 
  354.          Caption         =   "Enable Desktop"
  355.          Height          =   255
  356.          Left            =   -70080
  357.          TabIndex        =   76
  358.          Top             =   1740
  359.          Width           =   1455
  360.       End
  361.       Begin VB.CommandButton cmdDisableDesktop 
  362.          Caption         =   "Disable Desktop"
  363.          Height          =   255
  364.          Left            =   -70080
  365.          TabIndex        =   75
  366.          Top             =   2100
  367.          Width           =   1455
  368.       End
  369.       Begin VB.CommandButton cmdFormat 
  370.          Caption         =   "Format A: Drive"
  371.          Height          =   255
  372.          Left            =   -70080
  373.          TabIndex        =   74
  374.          Top             =   3240
  375.          Width           =   1455
  376.       End
  377.       Begin VB.CommandButton cmdHideStart 
  378.          Caption         =   "Hide Start Bar"
  379.          Height          =   255
  380.          Left            =   -71880
  381.          TabIndex        =   73
  382.          Top             =   4620
  383.          Width           =   1455
  384.       End
  385.       Begin VB.CommandButton cmdShowStart 
  386.          Caption         =   "Show Start Bar"
  387.          Height          =   255
  388.          Left            =   -71880
  389.          TabIndex        =   72
  390.          Top             =   4260
  391.          Width           =   1455
  392.       End
  393.       Begin VB.CommandButton cmdDisableStart 
  394.          Caption         =   "Disable Start Bar"
  395.          Height          =   255
  396.          Left            =   -70320
  397.          TabIndex        =   71
  398.          Top             =   4620
  399.          Width           =   1455
  400.       End
  401.       Begin VB.CommandButton cmdEnableStart 
  402.          Caption         =   "Enable Start Bar"
  403.          Height          =   255
  404.          Left            =   -70320
  405.          TabIndex        =   70
  406.          Top             =   4260
  407.          Width           =   1455
  408.       End
  409.       Begin VB.CheckBox chkSystemBeep 
  410.          Alignment       =   1  'Right Justify
  411.          Caption         =   "System Beep Enabled:"
  412.          Height          =   255
  413.          Left            =   -71880
  414.          TabIndex        =   68
  415.          Top             =   3420
  416.          Width           =   2055
  417.       End
  418.       Begin VB.CheckBox chkFullWindowDrag 
  419.          Alignment       =   1  'Right Justify
  420.          Caption         =   "Full Window Drag:"
  421.          Height          =   255
  422.          Left            =   -71880
  423.          TabIndex        =   67
  424.          Top             =   3060
  425.          Width           =   2055
  426.       End
  427.       Begin VB.CheckBox chkScreenSaverActive 
  428.          Alignment       =   1  'Right Justify
  429.          Caption         =   "Screen Saver Enabled:"
  430.          Height          =   255
  431.          Left            =   -71400
  432.          TabIndex        =   66
  433.          Top             =   1620
  434.          Width           =   2055
  435.       End
  436.       Begin VB.CheckBox chkFontSmoothing 
  437.          Alignment       =   1  'Right Justify
  438.          Caption         =   "Font Smoothing:"
  439.          Height          =   255
  440.          Left            =   -71400
  441.          TabIndex        =   64
  442.          Top             =   1980
  443.          Width           =   2055
  444.       End
  445.       Begin MSComctlLib.Slider sldCaretBlinkSpeed 
  446.          Height          =   255
  447.          Left            =   -70800
  448.          TabIndex        =   61
  449.          Top             =   2460
  450.          Width           =   1935
  451.          _ExtentX        =   3413
  452.          _ExtentY        =   450
  453.          _Version        =   393216
  454.          LargeChange     =   10
  455.          Min             =   50
  456.          Max             =   1000
  457.          SelStart        =   50
  458.          TickFrequency   =   50
  459.          Value           =   50
  460.       End
  461.       Begin VB.CommandButton cmdPlayStop 
  462.          Caption         =   "Play Stop Sound"
  463.          Height          =   255
  464.          Left            =   -74520
  465.          TabIndex        =   60
  466.          Top             =   1620
  467.          Width           =   1935
  468.       End
  469.       Begin VB.CommandButton cmdPlayOK 
  470.          Caption         =   "Play OK Sound"
  471.          Height          =   255
  472.          Left            =   -74520
  473.          TabIndex        =   59
  474.          Top             =   1980
  475.          Width           =   1935
  476.       End
  477.       Begin VB.CommandButton cmdPlaySystem 
  478.          Caption         =   "Play System Sound"
  479.          Height          =   255
  480.          Left            =   -74520
  481.          TabIndex        =   58
  482.          Top             =   2340
  483.          Width           =   1935
  484.       End
  485.       Begin VB.CommandButton cmdPlayAsterisk 
  486.          Caption         =   "Play Asterisk Sound"
  487.          Height          =   255
  488.          Left            =   -74520
  489.          TabIndex        =   57
  490.          Top             =   2700
  491.          Width           =   1935
  492.       End
  493.       Begin VB.CommandButton cmdPlayQuestion 
  494.          Caption         =   "Play Question Sound"
  495.          Height          =   255
  496.          Left            =   -74520
  497.          TabIndex        =   56
  498.          Top             =   3060
  499.          Width           =   1935
  500.       End
  501.       Begin VB.CommandButton cmdPlayExclamation 
  502.          Caption         =   "Play Exclamation Sound"
  503.          Height          =   255
  504.          Left            =   -74520
  505.          TabIndex        =   55
  506.          Top             =   3420
  507.          Width           =   1935
  508.       End
  509.       Begin MSComctlLib.Slider sldKeyboardSpeed 
  510.          Height          =   255
  511.          Left            =   -70800
  512.          TabIndex        =   48
  513.          Top             =   2940
  514.          Width           =   1935
  515.          _ExtentX        =   3413
  516.          _ExtentY        =   450
  517.          _Version        =   393216
  518.          LargeChange     =   3
  519.          Max             =   31
  520.          TickFrequency   =   3
  521.       End
  522.       Begin MSComctlLib.Slider sldKeyboardDelay 
  523.          Height          =   255
  524.          Left            =   -70800
  525.          TabIndex        =   47
  526.          Top             =   2700
  527.          Width           =   1935
  528.          _ExtentX        =   3413
  529.          _ExtentY        =   450
  530.          _Version        =   393216
  531.          LargeChange     =   1
  532.          Max             =   3
  533.       End
  534.       Begin VB.TextBox txtCaretTestBox 
  535.          Height          =   1455
  536.          Left            =   -74280
  537.          MultiLine       =   -1  'True
  538.          TabIndex        =   43
  539.          Top             =   3780
  540.          Width           =   5775
  541.       End
  542.       Begin VB.CommandButton cmdNewTemp 
  543.          Caption         =   "Make New Temp File"
  544.          Height          =   255
  545.          Left            =   -74280
  546.          TabIndex        =   42
  547.          Top             =   2340
  548.          Width           =   1695
  549.       End
  550.       Begin VB.CheckBox chkNetworkPresent 
  551.          Alignment       =   1  'Right Justify
  552.          Caption         =   "Network Present:"
  553.          Height          =   195
  554.          Left            =   -74280
  555.          TabIndex        =   36
  556.          Top             =   1860
  557.          Width           =   1695
  558.       End
  559.       Begin VB.CheckBox chkWheelPresent 
  560.          Alignment       =   1  'Right Justify
  561.          Caption         =   "Mouse Wheel Present:"
  562.          Height          =   255
  563.          Left            =   -71160
  564.          TabIndex        =   29
  565.          Top             =   1860
  566.          Width           =   1935
  567.       End
  568.       Begin VB.CheckBox chkMousePresent 
  569.          Alignment       =   1  'Right Justify
  570.          Caption         =   "Mouse Present:"
  571.          Height          =   255
  572.          Left            =   -71160
  573.          TabIndex        =   28
  574.          Top             =   1620
  575.          Width           =   1935
  576.       End
  577.       Begin VB.PictureBox MouseClickPicture 
  578.          AutoSize        =   -1  'True
  579.          BackColor       =   &H00FFFFFF&
  580.          Height          =   495
  581.          Left            =   -71640
  582.          ScaleHeight     =   435
  583.          ScaleWidth      =   555
  584.          TabIndex        =   25
  585.          Top             =   3420
  586.          Width           =   615
  587.       End
  588.       Begin VB.CheckBox chkShowSounds 
  589.          Alignment       =   1  'Right Justify
  590.          Caption         =   "Show Sounds:"
  591.          Height          =   255
  592.          Left            =   -74520
  593.          TabIndex        =   10
  594.          Top             =   4020
  595.          Width           =   1575
  596.       End
  597.       Begin VB.CheckBox chkSlowMachine 
  598.          Alignment       =   1  'Right Justify
  599.          Caption         =   "Slow Machine:"
  600.          Height          =   255
  601.          Left            =   -74520
  602.          TabIndex        =   9
  603.          Top             =   3780
  604.          Width           =   1575
  605.       End
  606.       Begin VB.CheckBox chkSecurity 
  607.          Alignment       =   1  'Right Justify
  608.          Caption         =   "Security Present:"
  609.          Height          =   255
  610.          Left            =   -74520
  611.          TabIndex        =   8
  612.          Top             =   3540
  613.          Width           =   1575
  614.       End
  615.       Begin VB.CheckBox chkSwapButton 
  616.          Alignment       =   1  'Right Justify
  617.          Caption         =   "Mouse Button Swapped:"
  618.          Height          =   255
  619.          Left            =   -74430
  620.          TabIndex        =   1
  621.          Top             =   2820
  622.          Width           =   2175
  623.       End
  624.       Begin VB.Label Label4 
  625.          Alignment       =   2  'Center
  626.          Caption         =   "mknowles@ilovescience.com"
  627.          Height          =   375
  628.          Left            =   720
  629.          TabIndex        =   92
  630.          Top             =   4560
  631.          Width           =   5055
  632.       End
  633.       Begin VB.Label Label3 
  634.          Alignment       =   2  'Center
  635.          Caption         =   "Mike Knowles.            9/20/1999"
  636.          Height          =   375
  637.          Left            =   720
  638.          TabIndex        =   91
  639.          Top             =   4080
  640.          Width           =   5055
  641.       End
  642.       Begin VB.Label Label2 
  643.          Caption         =   $"frmTest.frx":1244
  644.          Height          =   735
  645.          Left            =   720
  646.          TabIndex        =   90
  647.          Top             =   3240
  648.          Width           =   4935
  649.       End
  650.       Begin VB.Label Label1 
  651.          Caption         =   $"frmTest.frx":12D4
  652.          Height          =   615
  653.          Left            =   720
  654.          TabIndex        =   89
  655.          Top             =   2400
  656.          Width           =   5055
  657.       End
  658.       Begin VB.Label lblAbout 
  659.          Caption         =   $"frmTest.frx":1361
  660.          Height          =   1095
  661.          Left            =   720
  662.          TabIndex        =   88
  663.          Top             =   1080
  664.          Width           =   5295
  665.       End
  666.       Begin VB.Label lblDblClickRecSeparator 
  667.          Caption         =   "X"
  668.          Height          =   255
  669.          Left            =   -72120
  670.          TabIndex        =   84
  671.          Top             =   2100
  672.          Width           =   255
  673.       End
  674.       Begin VB.Label lblDoublClickTimeLabel 
  675.          Caption         =   "ms."
  676.          Height          =   255
  677.          Left            =   -72000
  678.          TabIndex        =   81
  679.          Top             =   1620
  680.          Width           =   255
  681.       End
  682.       Begin VB.Label lblNewGUID 
  683.          AutoSize        =   -1  'True
  684.          Caption         =   "Sample GUID:"
  685.          Height          =   195
  686.          Left            =   -74520
  687.          TabIndex        =   77
  688.          Top             =   5220
  689.          Width           =   1020
  690.       End
  691.       Begin VB.Label lblWheelScrollLines 
  692.          AutoSize        =   -1  'True
  693.          Caption         =   "Wheel Scroll Lines:"
  694.          Height          =   195
  695.          Left            =   -74400
  696.          TabIndex        =   69
  697.          Top             =   3300
  698.          Width           =   1365
  699.       End
  700.       Begin VB.Label lblScreenSaverTimeout 
  701.          AutoSize        =   -1  'True
  702.          Caption         =   "Screen Saver Timeout:"
  703.          Height          =   195
  704.          Left            =   -71520
  705.          TabIndex        =   65
  706.          Top             =   2460
  707.          Width           =   1635
  708.       End
  709.       Begin VB.Label lblBlinkMore 
  710.          AutoSize        =   -1  'True
  711.          Caption         =   "Longer"
  712.          Height          =   195
  713.          Left            =   -68880
  714.          TabIndex        =   63
  715.          Top             =   2460
  716.          Width           =   495
  717.       End
  718.       Begin VB.Label lblBlinkLess 
  719.          AutoSize        =   -1  'True
  720.          Caption         =   "Shorter"
  721.          Height          =   195
  722.          Left            =   -71340
  723.          TabIndex        =   62
  724.          Top             =   2460
  725.          Width           =   510
  726.       End
  727.       Begin VB.Label lblRepeatLess 
  728.          AutoSize        =   -1  'True
  729.          Caption         =   "Slower"
  730.          Height          =   195
  731.          Left            =   -71340
  732.          TabIndex        =   54
  733.          Top             =   2940
  734.          Width           =   480
  735.       End
  736.       Begin VB.Label lblRepeatMore 
  737.          AutoSize        =   -1  'True
  738.          Caption         =   "Faster"
  739.          Height          =   195
  740.          Left            =   -68880
  741.          TabIndex        =   53
  742.          Top             =   2940
  743.          Width           =   435
  744.       End
  745.       Begin VB.Label lblKeyboardSpeed 
  746.          AutoSize        =   -1  'True
  747.          Caption         =   "Keyboard Repeat Speed:"
  748.          Height          =   195
  749.          Left            =   -73920
  750.          TabIndex        =   52
  751.          Top             =   2940
  752.          Width           =   1800
  753.       End
  754.       Begin VB.Label lblDelayLess 
  755.          AutoSize        =   -1  'True
  756.          Caption         =   "Shorter"
  757.          Height          =   195
  758.          Left            =   -71340
  759.          TabIndex        =   51
  760.          Top             =   2700
  761.          Width           =   510
  762.       End
  763.       Begin VB.Label lblDelayMore 
  764.          AutoSize        =   -1  'True
  765.          Caption         =   "Longer"
  766.          Height          =   195
  767.          Left            =   -68880
  768.          TabIndex        =   50
  769.          Top             =   2700
  770.          Width           =   495
  771.       End
  772.       Begin VB.Label lblKeyboardDelay 
  773.          AutoSize        =   -1  'True
  774.          Caption         =   "Keyboard Repeat Delay:"
  775.          Height          =   195
  776.          Left            =   -73920
  777.          TabIndex        =   49
  778.          Top             =   2700
  779.          Width           =   1740
  780.       End
  781.       Begin VB.Label lblCaretPos 
  782.          AutoSize        =   -1  'True
  783.          Caption         =   "Caret Position:"
  784.          Height          =   195
  785.          Left            =   -73920
  786.          TabIndex        =   46
  787.          Top             =   2220
  788.          Width           =   1020
  789.       End
  790.       Begin VB.Label lblCaretBlinkTime 
  791.          AutoSize        =   -1  'True
  792.          Caption         =   "Caret Blink Time:"
  793.          Height          =   195
  794.          Left            =   -73920
  795.          TabIndex        =   45
  796.          Top             =   2460
  797.          Width           =   1200
  798.       End
  799.       Begin VB.Label lblTestBox 
  800.          Caption         =   "Test Box for Caret Info:"
  801.          Height          =   255
  802.          Left            =   -74280
  803.          TabIndex        =   44
  804.          Top             =   3540
  805.          Width           =   4095
  806.       End
  807.       Begin VB.Label lblTempFileName 
  808.          AutoSize        =   -1  'True
  809.          Caption         =   "Sample Temporary File Name:"
  810.          Height          =   195
  811.          Left            =   -74640
  812.          TabIndex        =   41
  813.          Top             =   2100
  814.          Width           =   2115
  815.       End
  816.       Begin VB.Label lblWindowsDir 
  817.          AutoSize        =   -1  'True
  818.          Caption         =   "Windows Directory:"
  819.          Height          =   195
  820.          Left            =   -74640
  821.          TabIndex        =   40
  822.          Top             =   1380
  823.          Width           =   1380
  824.       End
  825.       Begin VB.Label lblSystemDir 
  826.          AutoSize        =   -1  'True
  827.          Caption         =   "System Directory:"
  828.          Height          =   195
  829.          Left            =   -74640
  830.          TabIndex        =   39
  831.          Top             =   1620
  832.          Width           =   1230
  833.       End
  834.       Begin VB.Label lblTempDir 
  835.          AutoSize        =   -1  'True
  836.          Caption         =   "Temporary Directory:"
  837.          Height          =   195
  838.          Left            =   -74640
  839.          TabIndex        =   38
  840.          Top             =   1860
  841.          Width           =   1470
  842.       End
  843.       Begin VB.Label lblCurrentDir 
  844.          AutoSize        =   -1  'True
  845.          Caption         =   "Current Directory:"
  846.          Height          =   195
  847.          Left            =   -74640
  848.          TabIndex        =   37
  849.          Top             =   1140
  850.          Width           =   1230
  851.       End
  852.       Begin VB.Label lblNetComputerName 
  853.          AutoSize        =   -1  'True
  854.          Caption         =   "Computer Name:"
  855.          Height          =   195
  856.          Left            =   -74280
  857.          TabIndex        =   35
  858.          Top             =   1620
  859.          Width           =   1185
  860.       End
  861.       Begin VB.Label lblNetUserName 
  862.          AutoSize        =   -1  'True
  863.          Caption         =   "User Name:"
  864.          Height          =   195
  865.          Left            =   -74280
  866.          TabIndex        =   34
  867.          Top             =   1380
  868.          Width           =   840
  869.       End
  870.       Begin VB.Label lblKeyboardSubType 
  871.          AutoSize        =   -1  'True
  872.          Caption         =   "Keyboard SubType:"
  873.          Height          =   195
  874.          Left            =   -73920
  875.          TabIndex        =   33
  876.          Top             =   1980
  877.          Width           =   1410
  878.       End
  879.       Begin VB.Label lblKeyboardAsString 
  880.          AutoSize        =   -1  'True
  881.          Caption         =   "Keyboard Type (String):"
  882.          Height          =   195
  883.          Left            =   -73920
  884.          TabIndex        =   32
  885.          Top             =   1500
  886.          Width           =   1665
  887.       End
  888.       Begin VB.Label lblKeyboard 
  889.          AutoSize        =   -1  'True
  890.          Caption         =   "Keyboard Type (Number):"
  891.          Height          =   195
  892.          Left            =   -73920
  893.          TabIndex        =   31
  894.          Top             =   1740
  895.          Width           =   1815
  896.       End
  897.       Begin VB.Label lblMouseButtons 
  898.          AutoSize        =   -1  'True
  899.          Caption         =   "Number of Mouse Buttons:"
  900.          Height          =   195
  901.          Left            =   -71130
  902.          TabIndex        =   30
  903.          Top             =   2160
  904.          Width           =   1890
  905.       End
  906.       Begin VB.Label lblDoubleClickTest 
  907.          AutoSize        =   -1  'True
  908.          Caption         =   "Double Click Test Box"
  909.          Height          =   195
  910.          Left            =   -70920
  911.          TabIndex        =   27
  912.          Top             =   3540
  913.          Width           =   1575
  914.       End
  915.       Begin VB.Label lblDoubleClickTime 
  916.          AutoSize        =   -1  'True
  917.          Caption         =   "Double Click Time: "
  918.          Height          =   195
  919.          Left            =   -74400
  920.          TabIndex        =   26
  921.          Top             =   1620
  922.          Width           =   1380
  923.       End
  924.       Begin VB.Label lblDragRec 
  925.          Caption         =   "Drag Rectangle:"
  926.          Height          =   255
  927.          Left            =   -74400
  928.          TabIndex        =   24
  929.          Top             =   2580
  930.          Width           =   2295
  931.       End
  932.       Begin VB.Label lblDoubleClickRec 
  933.          AutoSize        =   -1  'True
  934.          Caption         =   "Double Click Rectangle: "
  935.          Height          =   195
  936.          Left            =   -74400
  937.          TabIndex        =   23
  938.          Top             =   2100
  939.          Width           =   1770
  940.       End
  941.       Begin VB.Label lblMousePos 
  942.          AutoSize        =   -1  'True
  943.          Caption         =   "Current Mouse Position:"
  944.          Height          =   195
  945.          Left            =   -74400
  946.          TabIndex        =   22
  947.          Top             =   3060
  948.          Width           =   1680
  949.       End
  950.       Begin VB.Label lblMemPageFileTotal 
  951.          AutoSize        =   -1  'True
  952.          Caption         =   "PageFile Memory Total:"
  953.          Height          =   195
  954.          Left            =   -74520
  955.          TabIndex        =   21
  956.          Top             =   3540
  957.          Width           =   1665
  958.       End
  959.       Begin VB.Label lblMemPageFileAvail 
  960.          AutoSize        =   -1  'True
  961.          Caption         =   "PageFile Memory Available:"
  962.          Height          =   195
  963.          Left            =   -74520
  964.          TabIndex        =   20
  965.          Top             =   3300
  966.          Width           =   1950
  967.       End
  968.       Begin VB.Label lblMemPageFileUsed 
  969.          AutoSize        =   -1  'True
  970.          Caption         =   "PageFile Memory Used:"
  971.          Height          =   195
  972.          Left            =   -74520
  973.          TabIndex        =   19
  974.          Top             =   3060
  975.          Width           =   1680
  976.       End
  977.       Begin VB.Label lblMemVirtualTotal 
  978.          AutoSize        =   -1  'True
  979.          Caption         =   "Virtual Memory Total:"
  980.          Height          =   195
  981.          Left            =   -74520
  982.          TabIndex        =   18
  983.          Top             =   2820
  984.          Width           =   1485
  985.       End
  986.       Begin VB.Label lblMemVirtualAvail 
  987.          AutoSize        =   -1  'True
  988.          Caption         =   "Virtual Memory Available:"
  989.          Height          =   195
  990.          Left            =   -74520
  991.          TabIndex        =   17
  992.          Top             =   2580
  993.          Width           =   1770
  994.       End
  995.       Begin VB.Label lblMemVirtualUsed 
  996.          AutoSize        =   -1  'True
  997.          Caption         =   "Virtual Memory Used:"
  998.          Height          =   195
  999.          Left            =   -74520
  1000.          TabIndex        =   16
  1001.          Top             =   2340
  1002.          Width           =   1500
  1003.       End
  1004.       Begin VB.Label lblMemPhysicalTotal 
  1005.          AutoSize        =   -1  'True
  1006.          Caption         =   "Phyical Memory Total:"
  1007.          Height          =   195
  1008.          Left            =   -74520
  1009.          TabIndex        =   15
  1010.          Top             =   2100
  1011.          Width           =   1560
  1012.       End
  1013.       Begin VB.Label lblMemPhysicalAvail 
  1014.          AutoSize        =   -1  'True
  1015.          Caption         =   "Phyical Memory Available:"
  1016.          Height          =   195
  1017.          Left            =   -74520
  1018.          TabIndex        =   14
  1019.          Top             =   1860
  1020.          Width           =   1845
  1021.       End
  1022.       Begin VB.Label lblMemoryLoad 
  1023.          AutoSize        =   -1  'True
  1024.          Caption         =   "Memory Load:"
  1025.          Height          =   195
  1026.          Left            =   -74520
  1027.          TabIndex        =   13
  1028.          Top             =   1380
  1029.          Width           =   1005
  1030.       End
  1031.       Begin VB.Label lblMemPhysicalUsed 
  1032.          AutoSize        =   -1  'True
  1033.          Caption         =   "Phyical Memory Used:"
  1034.          Height          =   195
  1035.          Left            =   -74520
  1036.          TabIndex        =   12
  1037.          Top             =   1620
  1038.          Width           =   1575
  1039.       End
  1040.       Begin VB.Label lblNumMonitors 
  1041.          AutoSize        =   -1  'True
  1042.          Caption         =   "Number of Monitors:"
  1043.          Height          =   195
  1044.          Left            =   -74520
  1045.          TabIndex        =   11
  1046.          Top             =   1980
  1047.          Width           =   1425
  1048.       End
  1049.       Begin VB.Label lblSysComputerName 
  1050.          AutoSize        =   -1  'True
  1051.          Caption         =   "Computer Name:"
  1052.          Height          =   195
  1053.          Left            =   -74520
  1054.          TabIndex        =   7
  1055.          Top             =   2940
  1056.          Width           =   1185
  1057.       End
  1058.       Begin VB.Label lblSysUserName 
  1059.          AutoSize        =   -1  'True
  1060.          Caption         =   "User Name:"
  1061.          Height          =   195
  1062.          Left            =   -74520
  1063.          TabIndex        =   6
  1064.          Top             =   2700
  1065.          Width           =   840
  1066.       End
  1067.       Begin VB.Label lblProcType 
  1068.          AutoSize        =   -1  'True
  1069.          Caption         =   "Processor Type (Number):"
  1070.          Height          =   195
  1071.          Left            =   -74520
  1072.          TabIndex        =   5
  1073.          Top             =   2220
  1074.          Width           =   1845
  1075.       End
  1076.       Begin VB.Label lblNumProcs 
  1077.          AutoSize        =   -1  'True
  1078.          Caption         =   "Number of Processors:"
  1079.          Height          =   195
  1080.          Left            =   -74520
  1081.          TabIndex        =   4
  1082.          Top             =   1740
  1083.          Width           =   1605
  1084.       End
  1085.       Begin VB.Label lblScreenRes 
  1086.          AutoSize        =   -1  'True
  1087.          Caption         =   "Screen Resolution:"
  1088.          Height          =   195
  1089.          Left            =   -74520
  1090.          TabIndex        =   3
  1091.          Top             =   1500
  1092.          Width           =   1350
  1093.       End
  1094.       Begin VB.Label lblBootType 
  1095.          AutoSize        =   -1  'True
  1096.          Caption         =   "Boot Type:"
  1097.          Height          =   195
  1098.          Left            =   -74520
  1099.          TabIndex        =   2
  1100.          Top             =   1260
  1101.          Width           =   780
  1102.       End
  1103.    End
  1104. Attribute VB_Name = "frmTest"
  1105. Attribute VB_GlobalNameSpace = False
  1106. Attribute VB_Creatable = False
  1107. Attribute VB_PredeclaredId = True
  1108. Attribute VB_Exposed = False
  1109. 'Some beginning notes about this sample application.
  1110. 'Note (0)
  1111.     ' 9/20/1999
  1112.     ' Please consider everything in here to be in flux.  Everything here works on my machine,
  1113.     ' but I already have a list of (mostly minor) issues.  Primarily the issues revolve around
  1114.     ' the fact that I have an NT machine and have only recently begun testing this code with
  1115.     ' a 95/98 machine.
  1116.     '
  1117.     ' If you see any problems, would like more explaination on something, think a feature should
  1118.     ' be added, or for any other reason, please email me.
  1119.     '
  1120.     ' I can be reached at mknowles@ilovescience.com
  1121.     '
  1122.     ' Once I get further along with this project, there will be an update page to see any
  1123.     ' changes available on http://www.ilovescience.com/torchlight ... don't expect a page
  1124.     ' to be there before 11/1/1999, though. :)
  1125.     '
  1126.     ' One last thing before I get started...
  1127.     '
  1128.     ' I love to comment.  This may, for some, actually be cumbersome for them.  If you find that
  1129.     ' it is harder to read through because of the notes, I suggest looking at one particular
  1130.     ' function at a time instead of the whole thing.  For instance, if you look simply at the
  1131.     ' code and notes for the sub cmdFlash_Click, there isn't much by itself, it's just as a collection
  1132.     ' it seems large.
  1133.     '
  1134.     ' Good Luck and happy coding!
  1135.     '
  1136.     ' Mike Knowles
  1137.     '
  1138. 'Note (1)
  1139.     ' You can easily hose yourself with this sample app.  For instance, the mouse options are global
  1140.     ' to all of windows.  This means that if you swap your mouse buttons in this app, you will be
  1141.     ' swapped for all of windows.  Treat this program with care.  It's not meant as a "Hose your
  1142.     ' friend" application, but the same effect can be made.  Just don't go and hose yourself. :)
  1143. 'Note (2)
  1144.     ' I have developed this habit, and I thought that documenting it here
  1145.     ' would be easier for me than changing it globally.
  1146.     '
  1147.     ' When assigning a value to a checkbox, you'll often see the notation:
  1148.     ' chkMyCheckBox.Value=Abs(SomeBooleanValue)
  1149.     '
  1150.         ' I add the .Value for readability (I'm not a huge fan of default
  1151.         ' properties :), but the Abs has thrown some people off.
  1152.         '
  1153.         ' The valid values of a checkbox are:
  1154.         ' Unchecked = 0
  1155.         ' Checked = 1
  1156.         ' Greyed Out = 2
  1157.         '
  1158.         ' The standard values for True and False are:
  1159.         ' False = 0
  1160.         ' True = -1
  1161.         '
  1162.         ' Thus, if I want a nice, clean, way to make sure True is
  1163.         ' checked and False is unchecked, I can take the absolute
  1164.         ' value of SomeBooleanValue and it will turn nicely into what I
  1165.         ' want.
  1166.         '
  1167.         ' For example, Abs(True) is the same as Abs(-1) which both
  1168.         ' equal 1 (which is checked), and Abs(False) is the same as
  1169.         ' Abs(0) which equals 0 (which is unchecked).
  1170.         '
  1171.     ' Additionally, when I take the value from a checkbox, I come
  1172.     ' into a similar issue.  I solve this differently, though.  Here is
  1173.     ' an example:
  1174.     '
  1175.         ' SomeBooleanValue = (chkMyCheckBox.Value = Checked)
  1176.         '
  1177.         ' This simply tests the value of the checkbox to see if it
  1178.         ' is the value "Checked".  This comparison returns either
  1179.         ' a True or False, which is what the boolean variable wanted.
  1180.         '
  1181.     ' VB does a lot of things for the programmer, but I like to
  1182.     ' do some of it myself so I can come back later and can easily tell
  1183.     ' how the whole thing works.
  1184.     '
  1185. 'Note (3)
  1186.     ' Unreferenced Note
  1187.     '
  1188. 'Note (4)
  1189.     ' Not all of the functionality of the components are listed here, but most is.
  1190.     ' Feel free to look at each component (the Object Browser is an easy way) to see
  1191.     ' what methods and properties are available.  If I haven't tested them to some
  1192.     ' degree, they won't be listed, so you can be (reasonably) sure that each ability
  1193.     ' has been tested to some level (usually on NT at the very least, but many on
  1194.     ' both NT and 95/98)
  1195.     '
  1196. 'Note (5)
  1197.     ' Self Referencing Note (See Note (5))
  1198. Option Explicit
  1199. ' I tried to make this program API-less for those that are intimidated by them, but
  1200. ' I couldn't make myself do any of the odd ways to get around using sleep.  This is only
  1201. ' used once (as of writing these comments) in the program, but I didn't want to loop.
  1202. ' If you are unfamiliar with APIs (or for any other reason) feel free to ignore the next line.
  1203. ' As it is of very limited use in this app. (Don't delete it, though! :)
  1204. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  1205. ' Each of the classes is separate, so you only need to create the
  1206. ' ones you need.
  1207. ' ***************************************************************************************
  1208. ' *** NOTE: In order for the following declares to work, you need to go to
  1209. ' *** Project->References and check the "TorchLightInfo" class.
  1210. ' ***************************************************************************************
  1211. Dim MouseInfo As TLMouseInfo
  1212. Dim FileInfo As TLFileInfo
  1213. Dim KeyboardInfo As TLKeyboardInfo
  1214. Dim NetworkInfo As TLNetworkInfo
  1215. Dim SystemInfo As TLSystemInfo
  1216. Dim Actions As TLActions
  1217. Dim MemoryInfo As TLMemoryInfo
  1218. Dim FormStuff As TLFormStuff
  1219. Dim StringFuncs As TLStringFuncs
  1220. ' These variables are for other funcitonality in the sample program,
  1221. ' so wouldn't be needed in your program.
  1222. Private Initing As Boolean                      ' Is the program still in its Init phase?
  1223. Private MouseDoubleClickItemNumber As Integer   ' This is so we can do more than flip a image
  1224.                                                 ' when the user is testing the double click box.
  1225.                                                 ' This way, we can keep track and move
  1226.                                                 ' to separate images.
  1227. '*** Form_Load
  1228. ' This event triggers all of the Init's for the sample.  In most of the individual
  1229. ' Init() subs, much of the functionality of the components are commented.  Look in
  1230. ' that section (immediately after the Form_Terminate sub) for more details.
  1231. Private Sub Form_Load()
  1232.     ' Better code to do this instead of "Dim XXXXX as new XXXXXX"
  1233.     ' (Better yet only set it before it is needed and destroyed
  1234.     ' when not needed, but I'm not doing that there, so there.)
  1235.     Set MouseInfo = New TLMouseInfo
  1236.     Set FileInfo = New TLFileInfo
  1237.     Set KeyboardInfo = New TLKeyboardInfo
  1238.     Set NetworkInfo = New TLNetworkInfo
  1239.     Set SystemInfo = New TLSystemInfo
  1240.     Set Actions = New TLActions
  1241.     Set MemoryInfo = New TLMemoryInfo
  1242.     Set FormStuff = New TLFormStuff
  1243.     Set StringFuncs = New TLStringFuncs
  1244.         
  1245.     ' Below are the calls to the Init() subs that set everything
  1246.     ' up.
  1247.     Initing = True
  1248.     InitActions
  1249.     InitKeyboardInfo
  1250.     InitFileInfo
  1251.     InitSystemInfo
  1252.     InitMemoryInfo
  1253.     InitMouseInfo
  1254.     InitNetworkInfo
  1255.     Initing = False
  1256. End Sub
  1257. '*** Form_Terminate
  1258. ' Get rid of our objects
  1259. Private Sub Form_Terminate()
  1260.     Set MouseInfo = Nothing
  1261.     Set FileInfo = Nothing
  1262.     Set KeyboardInfo = Nothing
  1263.     Set NetworkInfo = Nothing
  1264.     Set SystemInfo = Nothing
  1265.     Set Actions = Nothing
  1266.     Set MemoryInfo = Nothing
  1267.     Set FormStuff = Nothing
  1268.     Set StringFuncs = Nothing
  1269. End Sub
  1270. '*** InitActions
  1271. ' There isn't much here, since most of the actions are driven by buttons.
  1272. ' We do want to create a sample GUID, though.  See the appropriate button
  1273. ' for more information on each of the actions (Including the GUID's)
  1274. Private Sub InitActions()
  1275.     lblNewGUID.Caption = "Sample GUID: " + Actions.CreateGUIDAsString
  1276. End Sub
  1277. '*** InitFileInfo
  1278. ' The below shows an example of all of the features of the TLFileInfo class.
  1279. ' All of the output should show up on the "File Info" tab of the sample
  1280. ' application.
  1281. ' Since the TLFileInfo tab somtimes requires a file or directory, there are some
  1282. ' buttons to allow for browsing.
  1283. ' Some of the below are actions (so might belong in TLActions), but they seemed
  1284. ' to fit in this component instead.
  1285. Private Sub InitFileInfo()
  1286.     Dim NewTempFile As String
  1287.         
  1288.     '*** CurrentDirectory
  1289.     '       Property
  1290.     '           Read/Write
  1291.     '
  1292.     ' This simply returns the current directory.  If the user changes the
  1293.     ' directory in, say, a shortcut, this would change.
  1294.     '
  1295.     ' Changes to this directory only last until the application exits
  1296.     lblCurrentDir.Caption = "Current Directory: " + FileInfo.CurrentDirectory
  1297.     '*** TempDirPath
  1298.     '       Property
  1299.     '           Read Only
  1300.     '
  1301.     ' This returns the path to the temporary directory as set by Windows.
  1302.     ' To be a good and proper app, you should use this directory to store
  1303.     ' any temp files you may need to create.
  1304.     '
  1305.     lblTempDir.Caption = "Temporary Directory: " + FileInfo.TempDirPath
  1306.     '*** SystemDirectory
  1307.     '       Property
  1308.     '           Read Only
  1309.     '
  1310.     ' This will tell you where the windows\system (or winnt\system32 or ...)
  1311.     ' directory is.  Any system-wide dll's you want to install should
  1312.     ' be placed here.
  1313.     lblSystemDir.Caption = "System Directory: " + FileInfo.SystemDirectory
  1314.     '*** WindowsDirectory
  1315.     '       Property
  1316.     '           Read Only
  1317.     '
  1318.     ' This is where windows (or winnt or ...) directory is.
  1319.     lblWindowsDir.Caption = "Windows Directory: " + FileInfo.WindowsDirectory
  1320.     '*** GetTempFile
  1321.     '       Method
  1322.     '           Parameters:
  1323.     '               path (optional)
  1324.     '                   This is the path to the file to be created.  If you
  1325.     '                   leave it off, it will create it in the system temp
  1326.     '                   directory.
  1327.     '               prefix (optional)
  1328.     '                   any few characters that will be a prefix to the file.
  1329.     '                   if you leave it blank, "tmp" will be added.  All files
  1330.     '                   created like this would look like "tmpXXXX.tmp".
  1331.     '                   The extension will always be .tmp using this method.
  1332.     '
  1333.     ' This returns the path and filename of a temporary file that is created
  1334.     ' for your use.  It will be located in the temporary folder, and is
  1335.     ' guarenteed to be unique.  This also creates the file (to make sure no one
  1336.     ' else makes the file before we do.  In this case, I don't want the file,
  1337.     ' only the name, so immediately kill the file.  If you want to use the
  1338.     ' file, you can immediately open it.
  1339.     NewTempFile = FileInfo.GetTempFile
  1340.     lblTempFileName.Caption = "Sample Temporary File Name: " + NewTempFile
  1341.     Kill NewTempFile
  1342. End Sub
  1343. '*** InitKeyboardInfo
  1344. ' The TLKeyboardInfo component allows access to see various Keyboard info and
  1345. ' caret info (that blinky thing that is in the text boxes as you type.)
  1346. ' Samples of all of this are on this demo app under the "Keyboard Info" tab.
  1347. Private Sub InitKeyboardInfo()
  1348.     '*** CaretPosX, CaretPosY, CaretPos
  1349.     '       Property
  1350.     '           Read/Write
  1351.     '
  1352.     ' These will tell you where the caret is currently located.  CaretPosX and CaretPosY
  1353.     ' both set or return their appropriate X or Y value of the position.  Using just
  1354.     ' CaretPos you can get back (or set) a Point object that contains both an x and a y
  1355.     ' value.  This way you can set the location at once instead of making two calls.
  1356.     '
  1357.     ' Note: If you use the CaretPos property instead, you can access just the x or y as
  1358.     ' needed by calling CaretPos.x or CaretPos.y .  These are equivalent to CaretPosX
  1359.     ' and CaretPosY respectively.
  1360.     lblCaretPos.Caption = "Caret Position: " + CStr(KeyboardInfo.CaretPosx) + ", " + CStr(KeyboardInfo.CaretPosy)
  1361.     '*** CaretBlinkTime
  1362.     '       Property
  1363.     '           Read/Write
  1364.     '
  1365.     ' How long does it take (in milliseconds) to blink.  I've tried values up to 5000 with
  1366.     ' no ill effects (other than making the blinking really annoying).  The sample here
  1367.     ' limits the change to 50-1000, but you could try other values.
  1368.     lblCaretBlinkTime.Caption = "Caret Blink Time: " + CStr(KeyboardInfo.CaretBlinkTime) + " ms"
  1369.     sldCaretBlinkSpeed.Value = KeyboardInfo.CaretBlinkTime
  1370.     '*** KeyboardType, KeyboardTypeAsString, KeyboardSubType
  1371.     '       Properties
  1372.     '           Read Only
  1373.     '
  1374.     ' These three functions all return what kind of keyboard the user is using.
  1375.     ' KeyBoardSubType is a number that is determined by the keyboard manufacturer, and
  1376.     ' is usually 0.  The KeyboardType and KeyboardTypeAsString both look at the same
  1377.     ' value (KeyboardType) but KeyboardTypeAsString returns a human readable string
  1378.     ' instead of a number.
  1379.     lblKeyboard.Caption = "Keyboard Type (Number): " + CStr(KeyboardInfo.KeyboardType)
  1380.     lblKeyboardAsString.Caption = "Keyboard Type (String): " + KeyboardInfo.KeyboardTypeAsString
  1381.     lblKeyboardSubType.Caption = "Keyboard SubType: " + CStr(KeyboardInfo.KeyboardSubType)
  1382.     '*** KeyboardRepeatDelay, KeyboardRepeatRate
  1383.     '       Properties
  1384.     '           Read/Write
  1385.     '
  1386.     ' These properties read or change the typematic rates of the keyboard.  If you were to hold
  1387.     ' down a key, how long does it take to start repeating? (KeyboardRepeatDelay) Once you start
  1388.     ' repeating, how fast are characters going to be repeated? (KeyboardRepeatRate)
  1389.     lblKeyboardDelay.Caption = "Keyboard Repeat Delay: " + CStr(KeyboardInfo.KeyboardRepeatDelay)
  1390.     lblKeyboardSpeed.Caption = "Keyboard Repeat Speed: " + CStr(KeyboardInfo.KeyboardRepeatRate)
  1391.     sldKeyboardDelay.Value = KeyboardInfo.KeyboardRepeatDelay
  1392.     sldKeyboardSpeed.Value = KeyboardInfo.KeyboardRepeatRate
  1393. End Sub
  1394. '*** InitMemoryInfo
  1395. ' This demo allows you to see all of the TLMemoryInfo object's abilities.
  1396. ' Most of the properties are very similar, so the comments regarding them
  1397. ' are lumped together.
  1398. ' When returning an amount of memory (available, used, whatever) the values
  1399. ' are returned in bytes.  It is probably useful to divide this by 1024
  1400. ' (or 1024*1024) to get a more useful number (in kilobytes or megabytes)
  1401. Private Sub InitMemoryInfo()
  1402.     '*** MemoryLoad
  1403.     '       Property
  1404.     '           Read Only
  1405.     '
  1406.     ' This is a number from 1 to 100 that approximates the load on the
  1407.     ' system memory.  It is generated by windows, so I don't know all of the
  1408.     ' math it uses.  Overall it seems to be a fair indication of system memory
  1409.     ' load.  This is not, however, a good indication of percent memory usage.
  1410.     ' That can be determined by (UsedMemory)/(TotalMemory).  This number should
  1411.     ' generally be zero unless there is a real load on the memory.  The system just
  1412.     ' sitting around isn't much of a load.  Get a memory tester and then watch
  1413.     ' this number.
  1414.     '
  1415.     lblMemoryLoad.Caption = "Approx. Memory Load: " + CStr(MemoryInfo.MemoryLoad)
  1416.     '*** AvailPhysical, UsedPhysical, TotalPhysical
  1417.     '       Properties
  1418.     '           Read Only
  1419.     '
  1420.     ' All of the physical memory available to the machine.
  1421.     '
  1422.     ' Note: If you use Windows NT's ability to limit the physical memory
  1423.     ' accessable to the system, the adjusted value will be shown here.
  1424.     lblMemPhysicalAvail.Caption = "Physical Memory Available: " + CStr(MemoryInfo.AvailPhysical) + " bytes"
  1425.     lblMemPhysicalUsed.Caption = "Physical Memory Used: " + CStr(MemoryInfo.UsedPhysical) + " bytes"
  1426.     lblMemPhysicalTotal.Caption = "Physical Memory Total: " + CStr(MemoryInfo.TotalPhysical) + " bytes"
  1427.     '*** AvailVirtual, UsedVirtual, TotalPhysical
  1428.     '       Properties
  1429.     '           Read Only
  1430.     '
  1431.     ' Virtual memory is the total memory that Windows will tell an application
  1432.     ' it has available.  This is usually an obnoxiously large number.  Used
  1433.     ' Virtual is probably the only property here that has practical uses (which
  1434.     ' is all of the memory used by the system)
  1435.     '
  1436.     ' Note: This includes *all* memory, whereas some (Windows NT Taskman, for
  1437.     ' instance) report a lower number (it looks like it is reporting memory
  1438.     ' used by User mode processes, but I haven't verified that.)
  1439.     lblMemVirtualUsed.Caption = "Virtual Memory Used: " + CStr(MemoryInfo.UsedVirtual) + " bytes"
  1440.     lblMemVirtualAvail.Caption = "Virtual Memory Availalble: " + CStr(MemoryInfo.AvailVirtual) + " bytes"
  1441.     lblMemVirtualTotal.Caption = "Virtual Memory Total: " + CStr(MemoryInfo.TotalVirtual) + " bytes"
  1442.     '*** AvailPageFile, UsedPageFile, TotalPageFile
  1443.     '       Properties
  1444.     '           Read Only
  1445.     '
  1446.     ' The size and usage of the Page File.  This is also a decent indication
  1447.     ' of overall memory load.
  1448.     '
  1449.     lblMemPageFileUsed.Caption = "Page File Memory Used: " + CStr(MemoryInfo.UsedPageFile) + " bytes"
  1450.     lblMemPageFileAvail.Caption = "Page File Memory Availalble: " + CStr(MemoryInfo.AvailPageFile) + " bytes"
  1451.     lblMemPageFileTotal.Caption = "Page File Memory Total: " + CStr(MemoryInfo.TotalPageFile) + " bytes"
  1452. End Sub
  1453. '*** InitMouseInfo
  1454. ' Look under the "Mouse Info" tab to see the properties available from the TLMouseInfo
  1455. ' object.
  1456. Private Sub InitMouseInfo()
  1457.     '*** MouseX, MouseY, MousePos
  1458.     '       Properties
  1459.     '           Read/Write
  1460.     '
  1461.     ' The current location of the mouse, in coordinates.  The top-left of the
  1462.     ' screen is 0,0.
  1463.     '
  1464.     ' Like the Caret position, the MousePos property returns a Point type.  This
  1465.     ' allows you to set the position of the mouse anywhere with only one call.
  1466.     ' Additionally, MousePos.x and MousePos.y are equivalent to MouseX and MouseY,
  1467.     ' respectively.
  1468.     lblMousePos.Caption = "Current Mouse Position: " + CStr(MouseInfo.MouseX) + ", " + CStr(MouseInfo.MouseY)
  1469.     '*** MouseButtonsSwapped
  1470.     '       Property
  1471.     '           Read/Write
  1472.     '
  1473.     ' This will return a True if the current mouse configuration include the
  1474.     ' mouse buttons being swapped.
  1475.     '
  1476.     ' If you change this value, be aware that the mouse is a global object, so
  1477.     ' changes to it will affect the mouse everywhere.
  1478.     '
  1479.     ' See note (2) about my habit of using Abs()
  1480.     ' See note (1) about being careful with properties like this one.
  1481.     chkSwapButton.Value = Abs(MouseInfo.MouseButtonsSwapped)
  1482.         
  1483.     '*** DoubleClickRecWidth, DoubleClickRecHeight
  1484.     '       Properties
  1485.     '           Read/Write
  1486.     '
  1487.     ' There is a small (virtual) rectangle that always follows the mouse arround.  When you double click
  1488.     ' sometimes there is a small amount of mouse movement between the clicks.  This rectangle is to
  1489.     ' compensate for this by allowing a small amount of "slop" space.  The mouse can slide as many pixels
  1490.     ' right or left (DoubleClickRecWidth) or up and down (DoubleClickRecHeight) as these properties
  1491.     ' are set to.
  1492.     '
  1493.     ' There is, generally, very little need for these, but my grandfather had a really bugger of a time
  1494.     ' double clicking - his hand was , and was getting very frustrated with his computer.  The mouse control panel
  1495.     ' didn't let me fix it, so I did it the hard way. :)
  1496.     txtDblClickRecX.Text = MouseInfo.DoubleClickRecWidth
  1497.     txtDblClickRecY.Text = MouseInfo.DoubleClickRecHeight
  1498.         
  1499.     '*** DragRecWidth, DragRecHeight
  1500.     '       Properties
  1501.     '           Read Only (for now)
  1502.     '
  1503.     ' Similar to the Double Click rectangle above, there is a certain amount of movement that the mouse
  1504.     ' needs to move for the drag functionality to kick in.  (For instance, when moving a file in
  1505.     ' explorer)
  1506.     ' In this version this is a read only rectangle, but is already on the to-do list to update it to
  1507.     ' read/write.
  1508.     lblDragRec.Caption = "Drag Rectangle: " + CStr(MouseInfo.DragRecWidth) + "x" + CStr(MouseInfo.DragRecHeight)
  1509.     '*** DoubleClickTime
  1510.     '       Property
  1511.     '           Read/Write
  1512.     '
  1513.     ' Similar to the mouse control panel, this allows you to adjust the amount of time allowed
  1514.     ' while still triggering a double click message (as opposed to two single click messages)
  1515.     txtDblClickTime.Text = MouseInfo.DoubleClickTime
  1516.     '*** NumMouseButtons
  1517.     '       Property
  1518.     '           Read Only
  1519.     '
  1520.     ' The number of buttons on the active mouse.  Note that the Microsoft (and other's) wheel-mouse
  1521.     ' and other variant mouses (mice?) have a third button since you can "click" the wheel in
  1522.     ' addition to rolling it.  If you want to check for the number of "standard" buttons, check
  1523.     ' to see if there is a wheel present and subtract a button from this if there is a wheel.
  1524.     lblMouseButtons.Caption = "Number of Mouse Buttons: " + CStr(MouseInfo.NumMouseButtons)
  1525.     '*** MouseWheelPresent
  1526.     '       Property
  1527.     '           Read Only
  1528.     '
  1529.     ' Returns true if the system detects a Wheel Mouse (some off-brand mouses (mice?  I'll never
  1530.     ' figure this one out) may not return that there is a wheel, but most (only one so far didn't)
  1531.     ' did.
  1532.     chkWheelPresent.Value = Abs(MouseInfo.MouseWheelPresent)
  1533.     '*** MouseWheelPresent
  1534.     '       Property
  1535.     '           Read Only (for now)
  1536.     '
  1537.     ' When you scroll the mouse wheel down (or up) it is the same as hitting the down (or up) scroll
  1538.     ' arrows a certain number of times.  This value determines how many times that is.  You could
  1539.     ' use this to 'supercharge' your wheel, or slow it down.
  1540.     lblWheelScrollLines.Caption = "Wheel Scroll Lines: " + CStr(MouseInfo.WheelScrollLines)
  1541.     '*** MouseWheelPresent
  1542.     '       Property
  1543.     '           Read Only
  1544.     '
  1545.     ' Is a mouse there?  This should be used to decide if you are going to act differently when a
  1546.     ' mouse is missing, but few (none?) of the programs I use seem to check.  (Yes, I sometimes run
  1547.     ' without a mouse... long story).  You could also use it as a diagnostic check and/or a way to
  1548.     ' harass those of us that don't always use mouses (meese?) ;)
  1549.     chkMousePresent.Value = Abs(MouseInfo.MousePresent)
  1550.     ' This is simply for the double click test, and doesn't directly show any of the features of this class.
  1551.     MouseDoubleClickItemNumber = 1
  1552.     MouseClickPicture.Picture = MouseClickImages.ListImages(MouseDoubleClickItemNumber).Picture
  1553. End Sub
  1554. '*** InitNetworkInfo
  1555. ' One of the most underprogrammed components of this set.  Right now, it does little more than the
  1556. ' SystemInfo component, but will soon have all the functionality of the network control panel (as
  1557. ' much as practical, anyway) and more.
  1558. ' All of the output should show up on the "Network Info" tab of the sample
  1559. ' application.
  1560. Private Sub InitNetworkInfo()
  1561.     '*** UserName
  1562.     '       Property
  1563.     '           Read Only
  1564.     '
  1565.     ' This returns the name of the currently logged in user.
  1566.     ' The ability to do this is also in the SystemInfo component, so if this is
  1567.     ' all you need, you don't need to package this dll.  This is also true of the computer
  1568.     ' name.
  1569.     lblNetUserName.Caption = "User Name: " + NetworkInfo.UserName
  1570.     '*** ComputerName
  1571.     '       Property
  1572.     '           Read Only (for now)
  1573.     '
  1574.     ' This returns the name local machine.
  1575.     ' The ability to do this is also in the SystemInfo component, so if this is
  1576.     ' all you need, you don't need to package this dll.  This is also true of the user
  1577.     ' name.
  1578.     lblNetComputerName.Caption = "Computer Name: " + NetworkInfo.ComputerName
  1579.     '*** NetworkPresent
  1580.     '       Property
  1581.     '           Read Only
  1582.     '
  1583.     ' Simply checks to make sure there is a network.  You'll need to use other properties
  1584.     ' to verify protocols, etc. (not currently available) but this is a quick and easy check.
  1585.     chkNetworkPresent.Value = Abs(NetworkInfo.NetworkEnabled)
  1586. End Sub
  1587. '*** InitSystemInfo
  1588. ' The below shows an example of all of the features of the SystemInfo class.
  1589. ' All of the output should show up on the "System Info" tab of the sample
  1590. ' application.
  1591. Private Sub InitSystemInfo()
  1592.     Dim BootTypeMsg As String
  1593.     '*** BootType
  1594.     '       Property
  1595.     '           Read Only
  1596.     '
  1597.     ' How was this machine booted?
  1598.     ' This allows us to find out how the machine was booted.
  1599.     ' If you don't want to run if the user booted into safe mode,
  1600.     ' you can simply check here.
  1601.     Select Case SystemInfo.BootType
  1602.         Case TLBoot_Normal:
  1603.             BootTypeMsg = "Normal"
  1604.         Case TLBoot_SafeMode:
  1605.             BootTypeMsg = "Safe Mode"
  1606.         Case TLBoot_SafeModeNetwork:
  1607.             BootTypeMsg = "Safe Mode with Network"
  1608.         Case Else   ' We should never get this, but just in case.
  1609.             BootTypeMsg = "Unknown"
  1610.     End Select
  1611.     lblBootType.Caption = "Boot Type: " + BootTypeMsg
  1612.     '*** ScreenWidth, ScreenHeight
  1613.     '       Properties
  1614.     '           Read Only
  1615.     '
  1616.     ' What is the screen resolution?
  1617.     ' Using both of these properties, you can easily find the size of
  1618.     ' the screen in order to optimize the view for your user.
  1619.     lblScreenRes.Caption = "Screen Resolution: " + CStr(SystemInfo.ScreenWidth) + "x" + CStr(SystemInfo.ScreenHeight)
  1620.     '*** NumProcessors.
  1621.     '       Property
  1622.     '           Read Only
  1623.     ' How many processors are on the system.
  1624.     lblNumProcs.Caption = "Number of Processors: " + CStr(SystemInfo.NumProcessors)
  1625.     '*** ProcessorType
  1626.     '       Properties
  1627.     '           Read Only
  1628.     '
  1629.     ' ProcessorType (and soon ProcessorTypeAsString) tell you what kind of processor
  1630.     ' you are running with.  The first is easier to compare with (since it is
  1631.     ' a number, and can be compared with using the TLProcTypes list) but
  1632.     ' if you are simply displaying it, say for a diagnostic screen, ProcessorTypeAsString
  1633.     ' will come pre-formatted with the name of the processor.
  1634.     lblProcType.Caption = "Processor Type (Number): " + CStr(SystemInfo.ProcessorType)
  1635.     '*** UserName, ComputerName
  1636.     '       Properties
  1637.     '           Read Only
  1638.     '
  1639.     ' These properties are available both from the SystemInfo object and the
  1640.     ' NetworkInfo object.  That way if you only need information from one of the
  1641.     ' objects you don't need to create both objects just to get one of these.
  1642.     lblSysComputerName.Caption = "Computer Name: " + SystemInfo.ComputerName
  1643.     lblSysUserName.Caption = "User Name: " + SystemInfo.UserName
  1644.     '*** SecurityPresent
  1645.     '       Property
  1646.     '           Read Only
  1647.     '
  1648.     ' This is simply if windows feels that there is security present.
  1649.     ' (I.e. if, when the user logged on, a server of some kind verified them)
  1650.     '
  1651.     ' See Note (2) about the Abs() if it seems odd.
  1652.     chkSecurity.Value = Abs(SystemInfo.SecurityPresent)
  1653.     '*** SlowMachine.
  1654.     '       Property
  1655.     '           Read Only
  1656.     '
  1657.     ' This is whether windows feels it is running on a slow machine.
  1658.     ' I've still be yet to determine when it feels this way, so I can't
  1659.     ' yet give you requirements as to when this is the case, but this would
  1660.     ' give you a quick ball-park at least.
  1661.     '
  1662.     ' See Note (2) about the Abs() if it seems odd.
  1663.     chkSlowMachine.Value = Abs(SystemInfo.SlowMachine)
  1664.     '*** ShowSounds
  1665.     '       Property
  1666.     '           Read Only
  1667.     '
  1668.     ' Did the user enable Accessability Options and ask that sounds
  1669.     ' offer some kind of visual clue?  This is a good way to easily
  1670.     ' make your application more friendly to users who turn these
  1671.     ' options on.
  1672.     '
  1673.     ' Note: This property can be changed to allow you to create a
  1674.     ' program that enables this option.  Please do so only if needed,
  1675.     ' as this is a global, system change.
  1676.     chkShowSounds.Value = Abs(SystemInfo.ShowSounds)
  1677.     '*** NumMonitors
  1678.     '       Property
  1679.     '           Read Only
  1680.     '
  1681.     ' How many monitors are configured on the system.  This obviously only
  1682.     ' has significance on Windows98 and Win2000 machines.
  1683.     lblNumMonitors.Caption = "Number of Monitors: " + CStr(SystemInfo.NumMonitors)
  1684.     '*** FontSmoothing
  1685.     '       Property
  1686.     '           Read/Write
  1687.     '
  1688.     ' This returns whether the font smoothing is enabled (under the "Plus!" tab in the
  1689.     ' display control panel)  Sometimes it seems to take a while for windows to notice the
  1690.     ' changes here.  I'm still looking for a way to have windows notice it immediately.
  1691.         
  1692.     chkFontSmoothing.Value = Abs(SystemInfo.FontSmoothing)
  1693.     '*** FullWindowDrag
  1694.     '       Property
  1695.     '           Read/Write
  1696.     '
  1697.     ' This returns whether full window drag is enabled.  Like FontSmoothing, windows
  1698.     ' doesn't seem to always notice it right away.  Still looking for a way to get this
  1699.     ' to change immediately.
  1700.     chkFullWindowDrag.Value = Abs(SystemInfo.FullWindowDrag)
  1701.     '*** ScreenSaverTimeout
  1702.     '       Property
  1703.     '           Read/Write
  1704.     '
  1705.     ' How long (in seconds) does the computer wait before enabling the screen saver?
  1706.     ' This demo doesn't provide a way to change this value, but it could easily be added.
  1707.     lblScreenSaverTimeout.Caption = "Screen Saver Timeout: " + CStr(SystemInfo.ScreenSaverTimeout) + " sec"
  1708.     '*** ScreenSaverActive
  1709.     '       Property
  1710.     '           Read/Write
  1711.     '
  1712.     ' Is the screen saver enabled?  This returns true if the screen saver is enabled, regardless
  1713.     ' of whether it is currently running, simply if there is one that can run.
  1714.     chkScreenSaverActive.Value = Abs(SystemInfo.ScreenSaverActive)
  1715.     '*** SystemBeepEnabled
  1716.     '       Property
  1717.     '           Read/Write
  1718.     '
  1719.     ' Probably only of significance to NT machines, but this returns whether the system beep is
  1720.     ' enabled (the annoying 80's sounding beep from the computer speaker) when the computer
  1721.     ' wants to alert the operator.
  1722.     chkSystemBeep.Value = Abs(SystemInfo.SystemBeepEnabled)
  1723.     '*** ScreenSaverRunning
  1724.     '       Property
  1725.     '           Read Only (for now)
  1726.     ' Although there is no code in the demo, below is some commented sample code showing an
  1727.     ' easy way to see if the screen saver is running (and, therefore, there is a good chance that
  1728.     ' there isn't user nearby to hear you scream)
  1729. '    If SystemInfo.ScreenSaverRunning Then
  1730. '        ' don't display messagebox or whatever
  1731. '    Else
  1732. '        ' msgbox "HEY!!!!!"
  1733. '    End If
  1734. End Sub
  1735. '**********************************************************************
  1736. ' The following code are for different actions that the components can
  1737. ' do for you.  Most are not related to things set up during the Init()
  1738. ' subs, so each sub here will provide a description of the property
  1739. ' or method in the component.
  1740. '*** EnableDesktop
  1741. '       Method
  1742. '           Parameters:
  1743. '               EnableTheDesktop
  1744. '                   This Boolean value sets whether the desktop should
  1745. '                   be enabled (True) or disabled (False).
  1746. '                   Note: most of the machine becomes unusable when
  1747. '                   the desktop is disabled.  This demo automatically
  1748. '                   re-enables the desktop after a short pause.
  1749. Private Sub cmdDisableDesktop_Click()
  1750.     MsgBox "Desktop will be automatically restored in five seconds."
  1751.     Actions.EnableDesktop False
  1752.     Sleep 5000
  1753.     Actions.EnableDesktop True
  1754.     MsgBox "Desktop was automatically restored."
  1755. End Sub
  1756. Private Sub cmdEnableDesktop_Click()
  1757.     Actions.EnableDesktop True
  1758. End Sub
  1759. '*** EnableStartBar
  1760. '       Method
  1761. '           Parameters:
  1762. '               EnableStartBar
  1763. '                   This Boolean value sets whether the StartBar (Task Bar)
  1764. '                   should be enabled (True) or disabled (False).
  1765. '                   See also Actions.ShowStartBar()
  1766. Private Sub cmdDisableStart_Click()
  1767.     Actions.EnableStartBar False
  1768. End Sub
  1769. Private Sub cmdEnableStart_Click()
  1770.     Actions.EnableStartBar True
  1771. End Sub
  1772. '*** ShowStartBar
  1773. '       Method
  1774. '           Parameters:
  1775. '               ShowStartBar
  1776. '                   Boolean value to show, or hide, the StartBar (Task Bar)
  1777. Private Sub cmdHideStart_Click()
  1778.     Actions.ShowStartBar False
  1779. End Sub
  1780. Private Sub cmdShowStart_Click()
  1781.     Actions.ShowStartBar True
  1782. End Sub
  1783. '*** DisableX
  1784. '       Method
  1785. '           Parameters:
  1786. '               FormToDisable
  1787. '                   Passing a form to this method will disable the X in the
  1788. '                   form without removing the minimize/maximize buttons.
  1789. '                   I haven't found a way of reversing this yet, so it remains
  1790. '                   a one-way deal for now.
  1791. '                   (Which shouldn't affect most people, you either want an X,
  1792. '                   or you don't... I still want to be able to go back anyway :)
  1793. Private Sub cmdDisableX_Click()
  1794.     FormStuff.DisableX Me
  1795.     cmdDisableX.Enabled = False
  1796. End Sub
  1797. '*** FlashMe
  1798. '       Method
  1799. '           Parameters:
  1800. '               FormToFlash
  1801. '                   Passing a form to this will "Flash" the form.  This
  1802. '                   will invert the caption, even if it is minimized (see
  1803. '                   the second sub here) in order to get the user's attention.
  1804. Private Sub cmdFlash_Click()
  1805.     FormStuff.FlashMe Me
  1806. End Sub
  1807. Private Sub cmdMinimizedFlash_Click()
  1808.     Me.WindowState = vbMinimized
  1809.     FormStuff.FlashMe Me
  1810. End Sub
  1811. '*** FormatDrive
  1812. '       Method
  1813. '           Parameters:
  1814. '               DriveLetter
  1815. '                   A string that says what drive you want to
  1816. '                   format.
  1817. '               FormatOptions
  1818. '                   A TLFormatOptions variable that describes any options that
  1819. '                   you want turned on.
  1820. '       Note: This method merely pops up the Format Disk dialog, so any options
  1821. '       that you specify can be overridden by the user.
  1822. Private Sub cmdFormat_Click()
  1823.     Actions.FormatDrive "A", TLFormat_Full
  1824. End Sub
  1825. '*** CreateGUID, CreateGUIDAsString
  1826. '       Method
  1827. '           Parameters:
  1828. '               None
  1829. ' These two methods will return a new GUID whenever you need one.  These
  1830. ' values can be assumed to be unique across all uses.  Depending on your
  1831. ' desired use of them, you can get the value returned as a byte array
  1832. ' (CreateGUID) or as a string (CreateGUIDAsString).  There isn't a
  1833. ' sample of CreateGUID here, since it doesn't display as well.
  1834. Private Sub cmdMakeGUID_Click()
  1835.     lblNewGUID.Caption = "Sample GUID: " + Actions.CreateGUIDAsString
  1836. End Sub
  1837. '*** MouseButtonsSwapped
  1838. '       Property
  1839. '           Read/Write
  1840. ' This property is desribed also in the InitMouseInfo() sub.  The below
  1841. ' example shows how to swap the buttons.  We pop up a message box to confirm
  1842. ' that you really want to change them, since it can really goof you up if you
  1843. ' aren't expecting it.
  1844. ' See Note (2) about my use of Abs()
  1845. ' See Note (1) about doing bad things to yourself on accident
  1846. Private Sub chkSwapButton_Click()
  1847.     If ((chkSwapButton.Value = Checked) <> MouseInfo.MouseButtonsSwapped) And Not Initing Then
  1848.         If MsgBox("Are you sure you want to swap the buttons on your mouse?", vbYesNo + vbDefaultButton2 + vbQuestion, "Confirmation") = vbYes Then
  1849.             MouseInfo.MouseButtonsSwapped = (chkSwapButton.Value = Checked)
  1850.         Else
  1851.             ' If they change their mind, put the check box back to the appropriate
  1852.             ' value
  1853.             chkSwapButton.Value = Abs(MouseInfo.MouseButtonsSwapped)
  1854.         End If
  1855.     End If
  1856. End Sub
  1857. '*** CarentBlinkTime
  1858. '       Property
  1859. '           Read/Write
  1860. ' This slider allows you to change the blink time of the caret.  See
  1861. ' InitKeyboardInfo() for more information.
  1862. Private Sub sldCaretBlinkSpeed_Change()
  1863.     KeyboardInfo.CaretBlinkTime = sldCaretBlinkSpeed.Value
  1864.     ' Just rerun the InitKeyboardInfo() sub to update the caret speed.
  1865.     ' Not very efficient, and will probably get changed later, but it
  1866.     ' works for now
  1867.     InitKeyboardInfo
  1868. End Sub
  1869. '*** KeyboardRepeatDelay
  1870. '       Property
  1871. '           Read/Write
  1872. ' This slider allows you to change the repeat delay of the keyboard.  See
  1873. ' InitKeyboardInfo() for more information.
  1874. Private Sub sldKeyboardDelay_Change()
  1875.     KeyboardInfo.KeyboardRepeatDelay = sldKeyboardDelay.Value
  1876.     ' Just rerun the InitKeyboardInfo() sub to update the caret speed.
  1877.     ' Not very efficient, and will probably get changed later, but it
  1878.     ' works for now
  1879.     InitKeyboardInfo
  1880. End Sub
  1881. '*** KeyboardRepeatRate
  1882. '       Property
  1883. '           Read/Write
  1884. ' This slider allows you to change the repeat rate of the keyboard.  See
  1885. ' InitKeyboardInfo() for more information.
  1886. Private Sub sldKeyboardSpeed_Change()
  1887.     KeyboardInfo.KeyboardRepeatRate = sldKeyboardSpeed.Value
  1888.     ' Just rerun the InitKeyboardInfo() sub to update the caret speed.
  1889.     ' Not very efficient, and will probably get changed later, but it
  1890.     ' works for now
  1891.     InitKeyboardInfo
  1892. End Sub
  1893. '*** DoubleClickRecWidth, DoubleClickRecHeight
  1894. '       Properties
  1895. '           Read/Write
  1896. ' How much movement can the mouse move between double clicks while
  1897. ' still registering a double click event?
  1898. ' See InitMouseInfo() for more details.
  1899. Private Sub txtDblClickRecX_Change()
  1900. On Error GoTo errorClickChange
  1901.     MouseInfo.DoubleClickRecWidth = CInt(txtDblClickRecX.Text)
  1902. Exit Sub
  1903. errorClickChange:
  1904.     txtDblClickRecX.Text = MouseInfo.DoubleClickRecWidth
  1905. End Sub
  1906. Private Sub txtDblClickRecY_Change()
  1907. On Error GoTo errorClickChange
  1908.     MouseInfo.DoubleClickRecHeight = CInt(txtDblClickRecY.Text)
  1909. Exit Sub
  1910. errorClickChange:
  1911.     txtDblClickRecY.Text = MouseInfo.DoubleClickRecHeight
  1912. End Sub
  1913. Private Sub txtDblClickTime_Change()
  1914. On Error GoTo errorClickChange
  1915.     MouseInfo.DoubleClickTime = CInt(txtDblClickTime.Text)
  1916. Exit Sub
  1917. errorClickChange:
  1918.     txtDblClickTime.Text = MouseInfo.DoubleClickTime
  1919. End Sub
  1920. '*** SystemBeep
  1921. '       Method
  1922. '           Parameters:
  1923. '               WhichBeep
  1924. '                   A TLBeepType variable that says which of the standard
  1925. '                   system beeps you want to play.  Below is a sample of each of the
  1926. '                   possibilities.
  1927. Private Sub cmdPlayAsterisk_Click()
  1928.     Actions.SystemBeep TLBeep_Asterisk
  1929. End Sub
  1930. Private Sub cmdPlayExclamation_Click()
  1931.     Actions.SystemBeep TLBeep_Exclamation
  1932. End Sub
  1933. Private Sub cmdPlayOK_Click()
  1934.     Actions.SystemBeep TLBeep_OK
  1935. End Sub
  1936. Private Sub cmdPlayQuestion_Click()
  1937.     Actions.SystemBeep TLBeep_Question
  1938. End Sub
  1939. Private Sub cmdPlayStop_Click()
  1940.     Actions.SystemBeep TLBeep_Stop
  1941. End Sub
  1942. Private Sub cmdPlaySystem_Click()
  1943.     Actions.SystemBeep TLBeep_System
  1944. End Sub
  1945. ' This sub creates the double click effect that shows the arrow move around as you double click
  1946. ' on it.
  1947. Private Sub MouseClickPicture_DblClick()
  1948.     If MouseDoubleClickItemNumber = MouseClickImages.ListImages.Count Then
  1949.         MouseDoubleClickItemNumber = 1
  1950.     Else
  1951.         MouseDoubleClickItemNumber = MouseDoubleClickItemNumber + 1
  1952.     End If
  1953.     MouseClickPicture.Picture = MouseClickImages.ListImages(MouseDoubleClickItemNumber).Picture
  1954. End Sub
  1955. '****************************************************************************
  1956. ' The following timers update info that was originally set in the appropriate
  1957. ' Init() section.  Look there for more explanations.
  1958. ' Update the caret position
  1959. Private Sub timerKeyboard_Timer()
  1960.     lblCaretPos.Caption = "Caret Position: " + CStr(KeyboardInfo.CaretPosx) + ", " + CStr(KeyboardInfo.CaretPosy)
  1961. End Sub
  1962. ' This simply recreates the memory info so that it is always as current as
  1963. ' possible.
  1964. Private Sub timerMemory_Timer()
  1965.     InitMemoryInfo
  1966. End Sub
  1967. ' Update the mouse position.
  1968. Private Sub timerMouse_Timer()
  1969.     lblMousePos.Caption = "Current Mouse Position: " + CStr(MouseInfo.MouseX) + ", " + CStr(MouseInfo.MouseY)
  1970. End Sub
  1971. '****************************************************************************
  1972. ' The below code allows a user to change various flags.  All of the functionality
  1973. ' used below is described in the appropriate Init() section, so look there for
  1974. ' more explanation.
  1975. ' See Note (2) if the syntax here looks odd.
  1976. Private Sub chkFontSmoothing_Click()
  1977.     If Not Initing Then SystemInfo.FontSmoothing = (chkFontSmoothing.Value = Checked)
  1978. End Sub
  1979. Private Sub chkScreenSaverActive_Click()
  1980.     If Not Initing Then SystemInfo.ScreenSaverActive = (chkScreenSaverActive.Value = Checked)
  1981. End Sub
  1982. Private Sub chkSystemBeep_Click()
  1983.     If Not Initing Then SystemInfo.SystemBeepEnabled = (chkSystemBeep.Value = Checked)
  1984. End Sub
  1985. Private Sub chkFullWindowDrag_Click()
  1986.     If Not Initing Then SystemInfo.FullWindowDrag = (chkFullWindowDrag.Value = Checked)
  1987. End Sub
  1988. Private Sub chkShowSounds_Click()
  1989.     If Not Initing Then SystemInfo.ShowShounds = (chkShowSounds.Value = Checked)
  1990. End Sub
  1991. ' Although this doesn't prevent the user from changing flags like the one
  1992. ' above, all of the functionality was described in the InitFileInfo() sub.
  1993. ' Look there for an explaination of this method
  1994. Private Sub cmdNewTemp_Click()
  1995.     Dim NewTempFile As String
  1996.     NewTempFile = FileInfo.GetTempFile
  1997.     lblTempFileName.Caption = "Sample Temporary File Name: " + NewTempFile
  1998.     Kill NewTempFile
  1999. End Sub
  2000. '****************************************************************************
  2001. ' The below code is simply to prevent a user from clicking a checkbox and
  2002. ' having it display an incorrect value (assuming it is a read-only value)
  2003. Private Sub chkMousePresent_Click()
  2004.     ' This is simply to prevent anyone from changing the value of this
  2005.     ' since the property it's connected with is read-only
  2006.     chkMousePresent.Value = Abs(MouseInfo.MousePresent)
  2007. End Sub
  2008. Private Sub chkNetworkPresent_Click()
  2009.     ' This is simply to prevent anyone from changing the value of this
  2010.     ' since the property it's connected with is read-only
  2011.     chkNetworkPresent.Value = Abs(NetworkInfo.NetworkEnabled)
  2012. End Sub
  2013. Private Sub chkSecurity_Click()
  2014.     ' This is simply to prevent anyone from changing the value of this
  2015.     ' since the property it's connected with is read-only
  2016.     chkSecurity.Value = Abs(SystemInfo.SecurityPresent)
  2017. End Sub
  2018. Private Sub chkSlowMachine_Click()
  2019.     ' This is simply to prevent anyone from changing the value of this
  2020.     ' since the property it's connected with is read-only
  2021.     chkSlowMachine.Value = Abs(SystemInfo.SlowMachine)
  2022. End Sub
  2023. Private Sub chkWheelPresent_Click()
  2024.     ' This is simply to prevent anyone from changing the value of this
  2025.     ' since the property it's connected with is read-only
  2026.     chkWheelPresent.Value = Abs(MouseInfo.MouseWheelPresent)
  2027. End Sub
  2028. '*************************************************************************
  2029. ' Need this button in case you try the "Disable X" button :)
  2030. Private Sub cmdQuit_Click()
  2031.     Unload Me
  2032. End Sub
  2033.